﻿using System;
using System.Windows;

using NavFx;

namespace  $safeprojectname$
{
	/// <summary>
	/// First page loaded into the Shell acting
	/// as a home page for the application
	/// </summary>
	/// <remarks>
	/// The base class provides all the support required
	/// for this so nothing needs to be overridden or added
	/// </remarks>
	public partial class Home: HostPage
	{
		#region Private members

		/// <summary>
		/// uri for the library that contains the dynamically loaded pages for the demo
		/// </summary>
		private Uri libraryUri = new Uri(@"MyPages.dll", UriKind.Relative);
		
		/// <summary>
		/// Reference to the component handling transitions from page to page
		/// </summary>
		private SimpleTransitor navTransitor = null;

		/// <summary>
		/// Helper method to load a page
		/// </summary>
		/// <param name="path">Path of the page to be loaded</param>
		private void goToPage(string path)
		{
			this.Navigator.GoToPage(path, false, this.libraryUri);
		}

		#endregion

		#region Constructors

		/// <summary>
		/// Default constructor
		/// </summary>
		public Home():base()
		{ 
			//capture a reference to the component that handles
			//transition from page to page
			this.navTransitor = (SimpleTransitor)this.Navigator.Transitor;
			
			InitializeComponent();
		}

		#endregion
	}
}
